//
//  BaseTableViewCell.m
//  TheRicher
//
//  Created by 李晓东 on 2018/1/18.
//  Copyright © 2018年 PeanutXu. All rights reserved.
//

#import "BaseTableViewCell.h"

@implementation BaseTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (NSAttributedString *)patternText:(NSString *)content andRange:(NSRange)range andValue:(id)value andAttribute:(NSAttributedStringKey)attribute andRange:(NSRange)range2, ...{
    NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:content];
    [attributeStr addAttribute:attribute value:value range:range];
    
    
    if (range2.length > 0) {
        va_list argList;
        va_start(argList, range2);
        id valueName = va_arg(argList, id);
        while (valueName) {
            id key = va_arg(argList, id);
            [attributeStr addAttribute:key value:valueName range:range2];
            valueName = va_arg(argList, id);
        }
        va_end(argList);
    }
    return attributeStr;
    
}

@end
